package com.hopu.service.impl;

import com.hopu.domain.ContractC;
import com.hopu.domain.ContractProductC;
import com.hopu.mapper.ContractProductCMapper;
import com.hopu.service.ContractProductCService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;

@Service
public class ContractProductCServiceImpl implements ContractProductCService {

    @Autowired
    ContractProductCMapper productCMapper;
    @Override
    public List<ContractProductC> selectByPrimaryKey(String contractId) {
        return productCMapper.selectByPrimaryKey(contractId);
    }

    @Override
    public int insert(ContractProductC record) {
        return productCMapper.insert(record);
    }

    @Override
    public int deleteByPrimaryKey(String contractProductId) {
        return productCMapper.deleteByPrimaryKey(contractProductId);
    }

    @Override
    public ContractProductC selectPrimaryKey(String contractProductId) {
        return productCMapper.selectPrimaryKey(contractProductId);
    }

    @Override
    public int updateByPrimaryKey(ContractProductC record) {
        return productCMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<ContractProductC> selectByContractProductC(String contractId) {
        return productCMapper.selectByContractProductC(contractId);
    }

    @Override
    //级联删除
    public int deleteByContractId(String[] ids) {
        return productCMapper.deleteByContractId(ids);
    }
}
